package com.fourth.controller.api;

import com.fourth.service.UBbusinessService;
import com.ljx.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LJX
 * @Description: TODO
 * @Date: 2023/3/4 9:52
 * @Version 1.0
 */
@Api(value = "/system/business", tags = {": TODO"})
@RestController
@RequestMapping("/system/business")
public class UBbusinessController {

	@Autowired
	private UBbusinessService uBbusinessService;
	@ApiImplicitParams({
			@ApiImplicitParam(paramType = "path", dataType = "string", name = "telephone", value = "", required = true),
			@ApiImplicitParam(paramType = "path", dataType = "string", name = "newPassword", value = "", required = true)
	})
	@ApiOperation(value = "修改密码")
	@RequestMapping("/changepass/{telephone}/{newPassword}")
	public Result changepass(@PathVariable("telephone") String telephone , @PathVariable("newPassword") String newPassword){

		return uBbusinessService.updatePassword(telephone,newPassword);
	}
}
